package com.zy.project.system.permission.manager.impl;

import com.zy.core.data.jpa.support.manager.impl.BaseManagerImpl;
import com.zy.core.data.jpa.support.repository.BaseRepository;
import com.zy.project.system.permission.entity.SystemPermission;
import com.zy.project.system.permission.manager.SystemPermissionManager;
import com.zy.project.system.permission.repository.SystemPermissionRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * 系统权限相关及服务接口实现
 * Package: core.manager.impl
 * <p>
 * Description： TODO
 * <p>
 * Author: zhangyu
 * <p>
 * Date: Created in 2018-9-3 20:46
 * <p>
 * Company: mingtu
 * <p>
 * Copyright: Copyright (c) 2018
 * <p>
 * Version: 0.0.1
 * <p>
 * Modified By:
 */
@Service("permissionService")
@Transactional(readOnly=true)
public class SystemPermissionManagerImpl extends BaseManagerImpl<SystemPermission,String>
        implements SystemPermissionManager {

    @Autowired
    private SystemPermissionRepository permissionRepository;

    @Override
    public BaseRepository<SystemPermission, String> getDao() {
        return this.permissionRepository;
    }

    @Override
    public SystemPermission insertPermission(SystemPermission permission) {

        permission.setCreateDate(new Date());
        return null;
    }
}
